for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import process from 'child_process'
import fse from 'fs-extra'
import path from 'path'
import fs from 'fs'
import {
config
,abeExtend
} from '../'
function prepend(value, array) {
var newArray = array.slice(0)
newArray.unshift(value)
return newArray
}
var abeProcess = function(name, args = []) {
args = prepend(`ABE_WEBSITE=${config.root}`, args)
args = prepend(`ABEJS_PATH=${__dirname}/../../../dist`, args)
if (!abeExtend.lock.create(name)) {
return false
var proc
var file = `${__dirname}/../../cli/process/${name}.js`
try {
var stats = fse.statSync(file)
if (stats.isFile()) {
proc = process.fork(file, args)
}catch(err) {
file = abeExtend.plugins.instance.getProcess(name)
stats = fse.statSync(file)
console.log('process fork failed')
console.log
if(typeof proc !== 'undefined' && proc !== null) {
proc
proc.on('message', function( msg ) {
msg
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.
abeExtend.lock.remove(name)
proc.kill()
});
return true
export default abeProcess